<?php

namespace App\Models\CarModels;

use App\Models\SystemManagement\Department;
use App\Models\SystemManagement\Employee;
use Illuminate\Database\Eloquent\Model;

class CarRent extends Model
{
    //
    protected $table = 'cars_rent';
    protected $fillable = ['car_user','department_id','start_time','end_time','desc','status','apply_status','car_id'];

    public function department()
    {
        return $this->belongsTo(Department::class,'department_id');
    }

    function user()
    {
        return $this->belongsTo(Employee::class,'car_user');
    }

}
